// 云函数入口文件
const cloud = require('wx-server-sdk')
cloud.init()
const db = cloud.database() //初始化数据库
exports.main = async (event, context) => {
  const dbName = event.db;
  const collection = db.collection(dbName)
  const res = await collection.get()
  return res
};
